package com.tcc.fastline.HttpMethods;

import java.io.InputStream;
import java.net.URL;
import java.net.URLConnection;
import java.util.Scanner;

public class HttpMethods {

	public static String get(String endereco) {
		try {
			URL url = new URL(endereco);
			URLConnection conn = url.openConnection();
			InputStream is = conn.getInputStream();
			Scanner s = new Scanner(is);
			String json = s.useDelimiter("\\A").next();
			s.close();
			return json;
		} catch (Exception e) {
			throw new RuntimeException(e.getMessage());
		}
	}
}
